package com.leolian.spring02.activemq;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * ActiveMQ与Spring整合 ===初步整合 1.消费者 2.生产者 3.配置文件
 * 
 * @author Administrator
 */
public class JMSTest {

	public static void main(String[] args) {
		ApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath:activemq/applicationContext-activemq1.xml");

		SpringProducer producer = (SpringProducer) applicationContext.getBean("springProducer");
		producer.send();

		SpringConsumer consumer = (SpringConsumer) applicationContext.getBean("springConsumer");
		consumer.recive();
	}
}